import request from "@/utils/request";


export function list(query){
    return request({
        url:'/file/selectAll',
        method:'get',
        params:query
    })
}

export function deleteFile(id){
    return request({
        url:'/file/delete/' + id,
        method:'delete'
    })
}


export  function  deleteBatch(ids){
    return request({
        url:'/file/deleteBatch',
        method:'post',
        data:ids
    })
}

export function updateFile(data){
    return request({
        url:'/file/update',
        method:'post',
        data:data
    })
}

export function download(url){
    return request({
        url:'/file/'+url.split('/file/')[1],
        method:'get',
        responseType: 'blob'
    })
}

